package com.bdqn.Demo.dao;


import com.bdqn.Demo.pojo.SysUser;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;

/**
 * 用户数据层实现
 */
public class SysUserMapperImpl extends SqlSessionDaoSupport implements SysUserMapper{
//    private SqlSessionTemplate sqlSession;

    /**
     * 查询用户列表
     */
    @Override
    public List<SysUser> selectSysUserList(SysUser sysUser) {
        //return sqlSession.selectList("com.bdqn.dao.SysUserMapper.selectSysUserList",sysUser);
        return this.getSqlSession().selectList("com.bdqn.dao.SysUserMapper.selectSysUserList",sysUser);
    }

//    public SqlSessionTemplate getSqlSession() {
//        return sqlSession;
//    }
//
//    public void setSqlSession(SqlSessionTemplate sqlSession) {
//        this.sqlSession = sqlSession;
//    }

    /**
     * 保存用户
     */
    public int add(SysUser sysUser)
    {
        return this.add(sysUser);
    }
}
